#ifndef CONFIG_H
#define CONFIG_H

#include"fusexx.h"

class Config
{   public:
        char * host;
        char * port;
        char * user;
        char * password;
        char * database;
        
        int init_conn_pool; //!< The initial number of DB connections. Defaults to 4
        int max_conn_pool; //!< The maximum number of opened DB connections. Defaults to 32

        struct fuse_args args;

        Config();
        Config(int argc, char ** argv);

        int load_config_from_file(const char * filename);

        int process_option(const char * arg);

        void set_args(int argc, char ** argv);
        void init_fuse_args();
        void free_args();

    private:
        void init();
        static int arg_processor(void *data, const char *arg, int key, struct fuse_args *outargs);
};

#endif
